/** Object.assign 是浅拷贝*/
let o1 = {name: 'ahhh'};
let o2 = {age:{n:123}};

const r = Object.assign(o1, o2);
o2.age.n = 234;
console.log(r); //{ name: 'ahhh', age: { n: 234 } }


/** ... 展开默认也是浅拷贝的*/
/*let o1 = {name: 'ahhh'};
let o2 = {age:{n:123}};

const assign = {...o1, ...o2};

o2.age.n = 13;
console.log(assign); //发现是个浅拷贝*/

